<template>
  <a-table :dataSource="dataSource" :columns="columns" />
</template>


<script>
import {postAction} from '@/api/manage'
export default {
  comments:{
    postAction
  },
  name: "TbPurchaseGoodsList",
  data(){
    return {
      dataSource: [
        {
          key: '1',
          name: '胡彦斌',
          age: 32,
          address: '西湖区湖底公园1号',
        },
        {
          key: '2',
          name: '胡彦祖',
          age: 42,
          address: '西湖区湖底公园1号',
        },
      ],

      columns: [
        {
          title: '编号',
          dataIndex: 'goodsId',
          key: 'goodsId',
        },
        {
          title: '商品名称',
          dataIndex: 'goodsName',
          key: 'goodsName',
        },
        {
          title: '商品型号',
          dataIndex: 'goodsModel',
          key: 'goodsModel',
        },

        {
          title: '单价',
          dataIndex: 'price',
          key: 'price',
        },
        {
          title: '数量',
          dataIndex: 'goodsNum',
          key: 'goodsNum',
        },

        {
          title: '单位',
          dataIndex: 'goodsUnit',
          key: 'goodsUnit',
        },

        {
          title: '总金额',
          dataIndex: 'total',
          key: 'total',
        },
      ],
      url:{
        goodsList:"purchaseListGoods/goodsList"
      },
      searchForm:[],
    };
  },
  created() {
    postAction(this.url.supplier,this.searchForm).then((res)=>{
      //console.log(res)
      this.dataSource=res
    })

  },
  methods: {

  }
}
</script>

<style scoped>

</style>